<html>
	<head>
		<script language="Javascript1.2" src="prototype.js" ></script>
		<script language="Javascript1.2">
		
		
	function log()
	{
		var url = 'http://localhost:8080/EBSexposer/http-json/logger/logMessage.ebs';
		var pars = 'msg=ciao';
		
		var myAjax = new Ajax.Request(
			url, 
			{
				method: 'get', 
				parameters: pars, 
				onComplete: showResponse,
				onFailure: reportError
			});
		
	}
	
	function incCounter()
	{
		var url = 'http://localhost:8080/EBSexposer/http-json/counter/inc.ebs';
		var pars = '';
		
		var myAjax = new Ajax.Request(
			url, 
			{
				method: 'get', 
				parameters: '', 
				onComplete: showResponse,
				onFailure: reportError
			});
		
	}	
	
	function callEbs(serviceProvider,serviceName,params){
	}

	function showResponse(originalRequest)
	{
		var data = originalRequest.responseText.evalJSON();
		
	
		/*alert(originalRequest.responseText);*/
		/* $('counter').innerHtml('23'); */		
		/*alert(d.innerHTML);*/
		var d = $('counter');
		/*var jsonResponse = eval(originalRequest.responseText);*/
		/*var result = jsonResponse.result;*/
		d.innerHTML = 'counter: '+data.result+data.error;		
	}
	
	function reportError(request)
	{
		alert('Sorry. There was an error.');
	}
	
</script>
	</head>
	<body onload="" >
		<form action="">
			<span id="counter">-----</span><br/>
			<input type="button" onClick="incCounter()" value="increment counter" />
		</form>
	</body>
</html>